﻿using UnityEditor;

[CanEditMultipleObjects]
[CustomEditor(typeof(MyLoopGrid), true)]
public class MyLoopGridEditor : UIGridEditor
{
    /// <summary>
    /// Draw the inspector properties.
    /// </summary>
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        EditorGUILayout.Space();
        serializedObject.Update();

        NGUIEditorTools.BeginContents();
        NGUIEditorTools.DrawProperty(serializedObject, "ItemPrefab");
        NGUIEditorTools.EndContents();
        serializedObject.ApplyModifiedProperties();
    }
}

[CanEditMultipleObjects]
[CustomEditor(typeof(MyLoopScroll), true)]
public class MyLoopScrollEditor : Editor
{
    /// <summary>
    /// Draw the inspector properties.
    /// </summary>
    public override void OnInspectorGUI()
    {
        EditorGUILayout.Space();
        serializedObject.Update();

        NGUIEditorTools.BeginContents();
        NGUIEditorTools.DrawProperty(serializedObject, "ItemPrefab");
        NGUIEditorTools.EndContents();
        serializedObject.ApplyModifiedProperties();
    }
}